<?php echo '<?xml version="1.0" encoding="UTF-8" ?>'."\n"; // have to echo() this ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<?php foreach ($content->result() as $entry): ?>
	<url>
		<?php if ($bricabox->use_custom_domain): ?>
		<loc>http://<?php echo $bricabox->custom_domain; ?><?php echo content_url($entry); ?></loc>
		<?php else: ?>
		<loc>http://<?php echo $entry->subdomain; ?>.bricabox.com<?php echo content_url($entry); ?></loc>	
		<?php endif; ?>
		<lastmod><?php echo date('c', strtotime($entry->updated_at)); ?></lastmod>
		<changefreq>hourly</changefreq>
		<priority>0.7</priority>
	</url>
	<?php endforeach; ?>
</urlset>